import request from '@/router/axios';

// 检查包装条码
export const checkPacking = (seq) => {
  return request({
    url: '/api/mes-warehouse/packing/check',
    method: 'get',
    params: {
      seq
    }
  });
};

// 根据包装条码查询产品信息
export const getProductInfoByPackSn = (sequenceNumber) => {
  return request({
    url: '/api/mes-product/product/get-product-by-sn',
    method: 'post',
    data: {
      sequenceNumber
    }
  });
};

// 包装解绑
export const packingUnbound = (list) => {
  return request({
    url: '/api/mes-warehouse/packing/unbound/product',
    method: 'post',
    data: list
  });
};
// 外包装绑定
export const packingCreate = (list) => {
  return request({
    url: '/api/mes-warehouse/packing/product-create',
    method: 'post',
    data: list
  });
};

// 获取条码信息
export const getSnInfo = (sequenceNumber) => {
  return request({
    url: `/api/mes-product/product/get-by-sequence-number?sequenceNumber=${sequenceNumber}`,
    method: 'get',
    params: {}
  });
};
